# Archlive <http://archlive-pkg.googlecode.com>

pkgname=crossover-pro
pkgver=10.0.3
pkgrel=1
pkgdesc="Allows you to use Windows apps in a stable and supported envirnment (non-free Wine)"
arch=('i686' 'x86_64')
makedepends=()
provides=("crossover")
conflicts=("crossover" "crossover-games" "crossover-standart")
replaces=()
url="http://www.codeweavers.com"
license=('custom')
depends=(python2 gtk2 libsm libxrender libglade esound libtiff4 libjpeg6 libpng12 \
	libcapi20 libldap libxml2 libxslt libxt libxxf86vm libgl v4l-utils gsm jack \
	lcms mpg123 openal pygtk)
sourcefile="crossover-pro-demo_$pkgver-1_i386.deb"
md5sums=('24dd45d22d732d84cf63bcd83b610d1f')
if [ "${CARCH}" = 'x86_64' ]; then
	sourcefile="ia32-crossover-pro-demo_$pkgver-1_amd64.deb"
	md5sums=('8eb463860a5d4671b6b1b0dc7a748e4c')
	depends=(python2 lib32-gtk2 lib32-libsm lib32-libxrender \
		libglade esound libtiff4 lib32-libjpeg6 lib32-libpng12 \
		libcapi20 lib32-libldap lib32-libxml2 lib32-libxslt lib32-libxt \
		lib32-libxxf86vm lib32-libgl lib32-v4l-utils gsm lib32-jack \
		lib32-lcms lib32-mpg123 lib32-openal pygtk   
		)
fi
source=(#http://media.codeweavers.com/pub/crossover/cxlinux/demo/install-crossover-pro-demo-$pkgver.bin
	http://media.codeweavers.com/pub/crossover/cxlinux/demo/$sourcefile
	)
install=crossover.install
options=(!strip)

build() {
	cd $srcdir/
	ar x $sourcefile
	tar xf data.tar.gz -C $pkgdir
	rm $startdir/pkg/opt/cxoffice/doc # symbolic link
	mv $startdir/pkg/usr/share/doc $startdir/pkg/opt/cxoffice/
	rm $startdir/pkg/usr -r

	if [ -f $startdir/winewrapper.exe.so ]; then
		install -m755 $startdir/winewrapper.exe.so $pkgdir/opt/cxoffice/lib/wine/winewrapper.exe.so
	fi
}
